1. Field of the Invention
The present invention relates to a device for extracting a specified color from an input image and correcting the extracted color, and, in particular, relates to a device that adaptively switching color emphasis processing for the input image.
2. Description of the Related Art
A technique exists for extracting a desired color region from within an image photographed by a digital camera or the like and correcting the color region. For example, Japanese Patent Laid-Open No. 2004-201224 discloses a technique to divide an image into a plurality of regions and to perform processing to emphasize a different color for each region when automatically identifying a color to be emphasized in the image and performing the emphasis processing. Further, Japanese Patent Laid-Open No. 11-275363 discloses a technique to perform gradation hardening process on image data obtained by scanning a color negative film and to perform processing to convert a specified hue (e.g., cyan for sky blue) into a desired hue on the image data subjected to the gradation hardening process.
When an image photographed with a digital camera or the like is a landscape photograph including a person and the image has a color cast caused by any effect of a light source, a face color of the person within the image is not a favorable color. When color balance is accordingly adjusted for this image by publicly known white balance correction, the face color of the person changes to a favorable color. However, if further processing is conducted to emphasize saturation of the entire image so as to brighten a background color of the person (sky, mountain, or the like), the face color, which was successfully improved by the above color balance adjustment, is changed. Accordingly, it is desired to only brighten the background of a person while keeping the favorable face color. A technique to extract a specified color, except for the face color of the person, from the image data and to emphasize only the specified color, as described above, is effective for such a case. On the other hand, for a landscape photograph without a person, it is possible to form a favorable image by emphasizing saturation of the entire image and therefore it is not necessary to emphasize only a specified color of the background.
Further, the conventional techniques generally require two parameters for performing the emphasis processing by extracting an arbitrary hue from within an image. One is a parameter defining a desired hue range and the other is a modification parameter for how to modify the hue. The technique disclosed in Japanese Patent Laid-Open No. 11-275363 uses a parameter preliminarily defining the hue range of the sky-blue (cyan) to be extracted and a parameter (emphasis function F) of how to emphasize the color, and achieves the emphasis processing of a specified color by a combination of these parameters. However, if two parameters are required for performing single processing, it is necessary to design both parameters and to store both parameters in a memory. In addition, if two parameters exist, even when only one of the two is desired to be changed, the other parameter should be changed so as to avoid inconsistency of the two parameters and a problem arises that the change of the parameters is extremely troublesome.